package crudfx.container;
import crudfx.interop.*;
import crudfx.data.*;
import javax.swing.*;
import javax.swing.border.*;
import javafx.scene.paint.*;
/**
 * @profile desktop
 * @author Sergey Surikov
 */
public class Edge extends UIComponent {
    var panel:JamTop;
    public var content:UIComponent;
    public var color:Color on replace {setEdge();};
    public var thickness:Number=1 on replace {setEdge();};
    function setEdge(){
        panel.getJComponent().setBorder(new LineBorder(
            new java.awt.Color(color.red,color.green,color.blue,color.opacity)
            ,thickness));
        }
    init{
        panel=JamTop{
            content:bind content
            }
        setEdge();
        }
    override public function getJComponent():JComponent{
        return panel.getJComponent();
        }
    override public function highlight(s:String):Boolean{
        return panel.highlight(s);
        }
    override public function gather():DataTree{
        return panel.gather();
        }
    }
